<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>个人博客代码推送教程 | ShuangChenYue</title>
    <meta name="generator" content="VuePress 1.9.9">
    <link rel="icon" href="https://cdn.jsdelivr.net/gh/cmty256/imgs-blog@main/logo/白云.38zbldnhh180.jpg">
    <meta name="description" content="满招损，谦受益">
    <meta name="keywords" content="专注于Cpp语言的旅行者">
    
    <link rel="preload" href="/assets/css/0.styles.3fffbd7d.css" as="style"><link rel="preload" href="/assets/js/app.c23950b3.js" as="script"><link rel="preload" href="/assets/js/2.4615a819.js" as="script"><link rel="preload" href="/assets/js/88.e74f9927.js" as="script"><link rel="prefetch" href="/assets/js/10.5712a6b9.js"><link rel="prefetch" href="/assets/js/100.2b9c7044.js"><link rel="prefetch" href="/assets/js/101.b7031f7a.js"><link rel="prefetch" href="/assets/js/102.f5f3d542.js"><link rel="prefetch" href="/assets/js/11.64978825.js"><link rel="prefetch" href="/assets/js/12.4672093d.js"><link rel="prefetch" href="/assets/js/13.cda96393.js"><link rel="prefetch" href="/assets/js/14.0924c9b3.js"><link rel="prefetch" href="/assets/js/15.838c84fd.js"><link rel="prefetch" href="/assets/js/16.eb504b4c.js"><link rel="prefetch" href="/assets/js/17.10770306.js"><link rel="prefetch" href="/assets/js/18.47c8e9dc.js"><link rel="prefetch" href="/assets/js/19.9ccbab29.js"><link rel="prefetch" href="/assets/js/20.cfe64352.js"><link rel="prefetch" href="/assets/js/21.08ded76b.js"><link rel="prefetch" href="/assets/js/22.30a8a7ba.js"><link rel="prefetch" href="/assets/js/23.e55cce19.js"><link rel="prefetch" href="/assets/js/24.7def6d62.js"><link rel="prefetch" href="/assets/js/25.2b56efaf.js"><link rel="prefetch" href="/assets/js/26.3b3ea698.js"><link rel="prefetch" href="/assets/js/27.5c60f91f.js"><link rel="prefetch" href="/assets/js/28.2bbf1597.js"><link rel="prefetch" href="/assets/js/29.05fbd423.js"><link rel="prefetch" href="/assets/js/3.c7255874.js"><link rel="prefetch" href="/assets/js/30.54f725db.js"><link rel="prefetch" href="/assets/js/31.3e5c530d.js"><link rel="prefetch" href="/assets/js/32.f8ecda14.js"><link rel="prefetch" href="/assets/js/33.3bef3da7.js"><link rel="prefetch" href="/assets/js/34.0e1b1990.js"><link rel="prefetch" href="/assets/js/35.21acae61.js"><link rel="prefetch" href="/assets/js/36.744eb2f7.js"><link rel="prefetch" href="/assets/js/37.15a6e5e0.js"><link rel="prefetch" href="/assets/js/38.0fe5adf3.js"><link rel="prefetch" href="/assets/js/39.d873f04b.js"><link rel="prefetch" href="/assets/js/4.8844c7c6.js"><link rel="prefetch" href="/assets/js/40.a9c0394e.js"><link rel="prefetch" href="/assets/js/41.bd1b72f7.js"><link rel="prefetch" href="/assets/js/42.8c5ba50f.js"><link rel="prefetch" href="/assets/js/43.1c2fbec0.js"><link rel="prefetch" href="/assets/js/44.2601ff73.js"><link rel="prefetch" href="/assets/js/45.be6d6650.js"><link rel="prefetch" href="/assets/js/46.43c49e4e.js"><link rel="prefetch" href="/assets/js/47.915bfbea.js"><link rel="prefetch" href="/assets/js/48.2eab3613.js"><link rel="prefetch" href="/assets/js/49.80f28ebf.js"><link rel="prefetch" href="/assets/js/5.d85ca603.js"><link rel="prefetch" href="/assets/js/50.7807e666.js"><link rel="prefetch" href="/assets/js/51.1d274389.js"><link rel="prefetch" href="/assets/js/52.509cdcc1.js"><link rel="prefetch" href="/assets/js/53.aecfe03c.js"><link rel="prefetch" href="/assets/js/54.aa316fa4.js"><link rel="prefetch" href="/assets/js/55.b8aeead5.js"><link rel="prefetch" href="/assets/js/56.3e7b5654.js"><link rel="prefetch" href="/assets/js/57.3d08056f.js"><link rel="prefetch" href="/assets/js/58.00820ba6.js"><link rel="prefetch" href="/assets/js/59.4d4be159.js"><link rel="prefetch" href="/assets/js/6.b5c87a76.js"><link rel="prefetch" href="/assets/js/60.6089e8d9.js"><link rel="prefetch" href="/assets/js/61.2f20e8a2.js"><link rel="prefetch" href="/assets/js/62.03592460.js"><link rel="prefetch" href="/assets/js/63.77002dd4.js"><link rel="prefetch" href="/assets/js/64.9032ac20.js"><link rel="prefetch" href="/assets/js/65.1a70901c.js"><link rel="prefetch" href="/assets/js/66.f56322cc.js"><link rel="prefetch" href="/assets/js/67.b4720219.js"><link rel="prefetch" href="/assets/js/68.22b14d91.js"><link rel="prefetch" href="/assets/js/69.05d40a9b.js"><link rel="prefetch" href="/assets/js/7.b762b15a.js"><link rel="prefetch" href="/assets/js/70.58ee6b2e.js"><link rel="prefetch" href="/assets/js/71.c8c5e013.js"><link rel="prefetch" href="/assets/js/72.36050559.js"><link rel="prefetch" href="/assets/js/73.586878ae.js"><link rel="prefetch" href="/assets/js/74.249922dd.js"><link rel="prefetch" href="/assets/js/75.d2ec1b51.js"><link rel="prefetch" href="/assets/js/76.72fa47b7.js"><link rel="prefetch" href="/assets/js/77.63eb8e33.js"><link rel="prefetch" href="/assets/js/78.c551873e.js"><link rel="prefetch" href="/assets/js/79.dd1c3366.js"><link rel="prefetch" href="/assets/js/8.ce6b453e.js"><link rel="prefetch" href="/assets/js/80.3c1d3de0.js"><link rel="prefetch" href="/assets/js/81.0324d116.js"><link rel="prefetch" href="/assets/js/82.5d8ac119.js"><link rel="prefetch" href="/assets/js/83.6b6d94c4.js"><link rel="prefetch" href="/assets/js/84.142b2d74.js"><link rel="prefetch" href="/assets/js/85.63f77dcd.js"><link rel="prefetch" href="/assets/js/86.986eceed.js"><link rel="prefetch" href="/assets/js/87.b0ad936b.js"><link rel="prefetch" href="/assets/js/89.d8a1d85d.js"><link rel="prefetch" href="/assets/js/9.cee9094a.js"><link rel="prefetch" href="/assets/js/90.ba242523.js"><link rel="prefetch" href="/assets/js/91.25593ea0.js"><link rel="prefetch" href="/assets/js/92.2bf12b05.js"><link rel="prefetch" href="/assets/js/93.90e9d9cd.js"><link rel="prefetch" href="/assets/js/94.9483ee0f.js"><link rel="prefetch" href="/assets/js/95.613a2f80.js"><link rel="prefetch" href="/assets/js/96.3a67111e.js"><link rel="prefetch" href="/assets/js/97.5b13c18d.js"><link rel="prefetch" href="/assets/js/98.7fb9a2ea.js"><link rel="prefetch" href="/assets/js/99.81da5e8b.js">
    <link rel="stylesheet" href="/assets/css/0.styles.3fffbd7d.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open have-rightmenu"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="https://cdn.jsdelivr.net/gh/cmty256/imgs-blog@main/logo/白云.38zbldnhh180.jpg" alt="ShuangChenYue" class="logo"> <span class="site-name can-hide">ShuangChenYue</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="CPP语言" class="dropdown-title"><!----> <span class="title" style="display:;">CPP语言</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/c5bdd8/" class="nav-link">Cpp之旅</a></li><li class="dropdown-item"><!----> <a href="/pages/279e62/" class="nav-link">Cpp专栏</a></li><li class="dropdown-item"><!----> <a href="/pages/801755/" class="nav-link">Effective_CPP</a></li><li class="dropdown-item"><!----> <a href="/pages/6b2468/" class="nav-link">muduo网络库</a></li><li class="dropdown-item"><!----> <a href="/pages/5f8c9f/" class="nav-link">Unix环境高级编程</a></li><li class="dropdown-item"><!----> <a href="/pages/3f1d21/" class="nav-link">Cpp提高编程</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="计算机基础" class="dropdown-title"><!----> <span class="title" style="display:;">计算机基础</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/7b1cb2/" class="nav-link">计算机网络</a></li><li class="dropdown-item"><!----> <a href="/pages/6048a8/" class="nav-link">操作系统</a></li><li class="dropdown-item"><!----> <a href="/pages/3b34ba/" class="nav-link">数据结构</a></li><li class="dropdown-item"><!----> <a href="/pages/412fe7/" class="nav-link">Linux</a></li><li class="dropdown-item"><!----> <a href="/pages/2dcfa1/" class="nav-link">算法</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="数据库" class="dropdown-title"><!----> <span class="title" style="display:;">数据库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/efa3f2/" class="nav-link">基础篇</a></li><li class="dropdown-item"><!----> <a href="/pages/ccc445/" class="nav-link">MySql</a></li><li class="dropdown-item"><!----> <a href="/pages/54616e/" class="nav-link">Redis</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="系统设计" class="dropdown-title"><!----> <span class="title" style="display:;">系统设计</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/793d0a/" class="nav-link">权限校验</a></li><li class="dropdown-item"><!----> <a href="/pages/73ddd7/" class="nav-link">设计模式</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="开发日常" class="dropdown-title"><!----> <span class="title" style="display:;">开发日常</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/71f6ae/" class="nav-link">Git知识总结</a></li><li class="dropdown-item"><!----> <a href="/pages/777b8a/" class="nav-link">nvm使用小结</a></li><li class="dropdown-item"><!----> <a href="/pages/ee770e/" class="nav-link">虚拟机固定 IP 地址</a></li><li class="dropdown-item"><!----> <a href="/pages/e472d1/" class="nav-link">随笔（持续更新）</a></li><li class="dropdown-item"><!----> <a href="/pages/411aa4/" class="nav-link">VScode 插件 CodeGeeX 使用教程</a></li><li class="dropdown-item"><!----> <a href="/pages/0d525d/" class="nav-link">KylinV10 将项目上传至 Github教程</a></li><li class="dropdown-item"><!----> <a href="/pages/ef40f0/" class="nav-link">KylinV10 安装 MySQL 教程（可防踩雷）</a></li><li class="dropdown-item"><!----> <a href="/pages/f8640c/" aria-current="page" class="nav-link router-link-exact-active router-link-active">个人博客代码推送教程</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="前端学习" class="dropdown-title"><!----> <span class="title" style="display:;">前端学习</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/99897f/" class="nav-link">HTML与CSS</a></li><li class="dropdown-item"><!----> <a href="/pages/51542d/" class="nav-link">JS学习</a></li><li class="dropdown-item"><!----> <a href="/pages/803f9d/" class="nav-link">Vue3入门</a></li><li class="dropdown-item"><!----> <a href="/pages/ca4cfb/" class="nav-link">Vue3进阶</a></li><li class="dropdown-item"><!----> <a href="/pages/50e8d3/" class="nav-link">黑马Vue3</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="项目笔记" class="dropdown-title"><!----> <span class="title" style="display:;">项目笔记</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/08dfe9/" class="nav-link">ip_file_hook</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="面经" class="dropdown-title"><!----> <span class="title" style="display:;">面经</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/d69946/" class="nav-link">虎牙C++技术面经</a></li><li class="dropdown-item"><!----> <a href="/pages/29251d/" class="nav-link">金山一面复习</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="其它" class="dropdown-title"><!----> <span class="title" style="display:;">其它</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/fa256e/" class="nav-link">博客搭建</a></li><li class="dropdown-item"><!----> <a href="/pages/335531/" class="nav-link">网站收藏箱</a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar-hover-trigger"></div> <aside class="sidebar" style="display:none;"><!----> <nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="CPP语言" class="dropdown-title"><!----> <span class="title" style="display:;">CPP语言</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/c5bdd8/" class="nav-link">Cpp之旅</a></li><li class="dropdown-item"><!----> <a href="/pages/279e62/" class="nav-link">Cpp专栏</a></li><li class="dropdown-item"><!----> <a href="/pages/801755/" class="nav-link">Effective_CPP</a></li><li class="dropdown-item"><!----> <a href="/pages/6b2468/" class="nav-link">muduo网络库</a></li><li class="dropdown-item"><!----> <a href="/pages/5f8c9f/" class="nav-link">Unix环境高级编程</a></li><li class="dropdown-item"><!----> <a href="/pages/3f1d21/" class="nav-link">Cpp提高编程</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="计算机基础" class="dropdown-title"><!----> <span class="title" style="display:;">计算机基础</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/7b1cb2/" class="nav-link">计算机网络</a></li><li class="dropdown-item"><!----> <a href="/pages/6048a8/" class="nav-link">操作系统</a></li><li class="dropdown-item"><!----> <a href="/pages/3b34ba/" class="nav-link">数据结构</a></li><li class="dropdown-item"><!----> <a href="/pages/412fe7/" class="nav-link">Linux</a></li><li class="dropdown-item"><!----> <a href="/pages/2dcfa1/" class="nav-link">算法</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="数据库" class="dropdown-title"><!----> <span class="title" style="display:;">数据库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/efa3f2/" class="nav-link">基础篇</a></li><li class="dropdown-item"><!----> <a href="/pages/ccc445/" class="nav-link">MySql</a></li><li class="dropdown-item"><!----> <a href="/pages/54616e/" class="nav-link">Redis</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="系统设计" class="dropdown-title"><!----> <span class="title" style="display:;">系统设计</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/793d0a/" class="nav-link">权限校验</a></li><li class="dropdown-item"><!----> <a href="/pages/73ddd7/" class="nav-link">设计模式</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="开发日常" class="dropdown-title"><!----> <span class="title" style="display:;">开发日常</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/71f6ae/" class="nav-link">Git知识总结</a></li><li class="dropdown-item"><!----> <a href="/pages/777b8a/" class="nav-link">nvm使用小结</a></li><li class="dropdown-item"><!----> <a href="/pages/ee770e/" class="nav-link">虚拟机固定 IP 地址</a></li><li class="dropdown-item"><!----> <a href="/pages/e472d1/" class="nav-link">随笔（持续更新）</a></li><li class="dropdown-item"><!----> <a href="/pages/411aa4/" class="nav-link">VScode 插件 CodeGeeX 使用教程</a></li><li class="dropdown-item"><!----> <a href="/pages/0d525d/" class="nav-link">KylinV10 将项目上传至 Github教程</a></li><li class="dropdown-item"><!----> <a href="/pages/ef40f0/" class="nav-link">KylinV10 安装 MySQL 教程（可防踩雷）</a></li><li class="dropdown-item"><!----> <a href="/pages/f8640c/" aria-current="page" class="nav-link router-link-exact-active router-link-active">个人博客代码推送教程</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="前端学习" class="dropdown-title"><!----> <span class="title" style="display:;">前端学习</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/99897f/" class="nav-link">HTML与CSS</a></li><li class="dropdown-item"><!----> <a href="/pages/51542d/" class="nav-link">JS学习</a></li><li class="dropdown-item"><!----> <a href="/pages/803f9d/" class="nav-link">Vue3入门</a></li><li class="dropdown-item"><!----> <a href="/pages/ca4cfb/" class="nav-link">Vue3进阶</a></li><li class="dropdown-item"><!----> <a href="/pages/50e8d3/" class="nav-link">黑马Vue3</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="项目笔记" class="dropdown-title"><!----> <span class="title" style="display:;">项目笔记</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/08dfe9/" class="nav-link">ip_file_hook</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="面经" class="dropdown-title"><!----> <span class="title" style="display:;">面经</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/d69946/" class="nav-link">虎牙C++技术面经</a></li><li class="dropdown-item"><!----> <a href="/pages/29251d/" class="nav-link">金山一面复习</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="其它" class="dropdown-title"><!----> <span class="title" style="display:;">其它</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/fa256e/" class="nav-link">博客搭建</a></li><li class="dropdown-item"><!----> <a href="/pages/335531/" class="nav-link">网站收藏箱</a></li></ul></div></div> <!----></nav>  <ul class="sidebar-links"><li><a href="/pages/71f6ae/" class="sidebar-link">Git知识总结</a></li><li><a href="/pages/777b8a/" class="sidebar-link">nvm使用小结</a></li><li><a href="/pages/e472d1/" class="sidebar-link">随笔（持续更新）</a></li><li><a href="/pages/ee770e/" class="sidebar-link">虚拟机固定ip地址</a></li><li><a href="/pages/411aa4/" class="sidebar-link">VScode 插件 CodeGeex 使用教程</a></li><li><a href="/pages/0d525d/" class="sidebar-link">KylinV10 将项目上传至 Github</a></li><li><a href="/pages/ef40f0/" class="sidebar-link">KylinV10 安装 MySQL 教程（可防踩雷）</a></li><li><a href="/pages/f8640c/" aria-current="page" class="active sidebar-link">个人博客代码推送教程</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level2"><a href="/pages/f8640c/#第一种-没有设置远程库" class="sidebar-link">第一种，没有设置远程库</a></li><li class="sidebar-sub-header level2"><a href="/pages/f8640c/#第二种-设置远程库" class="sidebar-link">第二种，设置远程库</a></li><li class="sidebar-sub-header level2"><a href="/pages/f8640c/#后续更改继续提交的方式" class="sidebar-link">后续更改继续提交的方式</a></li></ul></li></ul> </aside> <div><main class="page"><div class="theme-vdoing-wrapper "><div class="articleInfo-wrap" data-v-06225672><div class="articleInfo" data-v-06225672><ul class="breadcrumbs" data-v-06225672><li data-v-06225672><a href="/" title="首页" class="iconfont icon-home router-link-active" data-v-06225672></a></li> <li data-v-06225672><span data-v-06225672>开发日常</span></li></ul> <div class="info" data-v-06225672><div title="作者" class="author iconfont icon-touxiang" data-v-06225672><a href="javascript:;" data-v-06225672>霜晨月</a></div> <div title="创建时间" class="date iconfont icon-riqi" data-v-06225672><a href="javascript:;" data-v-06225672>2023-12-21</a></div> <!----></div></div></div> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-title">目录</div> <div class="right-menu-content"></div></div></div> <h1><img src="">个人博客代码推送教程<!----></h1> <!----> <div class="theme-vdoing-content content__default"><h1 id="个人博客代码推送教程"><a href="#个人博客代码推送教程" class="header-anchor">#</a> 个人博客代码推送教程</h1> <p>生成静态文件 , yarn docs:build</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">npm</span> run docs:build
<span class="token function">rm</span> <span class="token parameter variable">-rf</span> <span class="token punctuation">..</span>/blog/dist/*
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>将 build 生成的 dist 目录拷贝至上一层目录中</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">cp</span> <span class="token parameter variable">-rf</span> docs/.vuepress/dist <span class="token punctuation">..</span>/blog/
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>进入生成的文件夹</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token builtin class-name">cd</span> <span class="token punctuation">..</span>/blog/dist
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>前面都一样，只有后面有没有设置远程库才有一点不一样</p> <p>git 初始化，每次初始化不影响推送</p> <h2 id="第一种-没有设置远程库"><a href="#第一种-没有设置远程库" class="header-anchor">#</a> 第一种，没有设置远程库</h2> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">git</span> init

<span class="token comment"># git add 文件名，例如</span>
<span class="token function">git</span> <span class="token function">add</span> SCY_BLOG
<span class="token comment"># 或者</span>
<span class="token function">git</span> <span class="token function">add</span> <span class="token parameter variable">-A</span>

<span class="token function">git</span> commit <span class="token parameter variable">-m</span> <span class="token string">'deploy'</span>

<span class="token function">git</span> branch <span class="token parameter variable">-M</span> main

<span class="token comment"># git push -f git@github.com:USERNAME/USERNAME.github.io.git main</span>
<span class="token comment"># SSH 传输</span>
<span class="token function">git</span> push <span class="token parameter variable">-f</span> git@github.com:xiaose-code/xiaose-code.github.io.git main
<span class="token comment"># HTTPS 传输</span>
<span class="token function">git</span> push <span class="token parameter variable">-f</span> https://github.com/xiaose-code/xiaose-code.github.io.git main
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br></div></div><h2 id="第二种-设置远程库"><a href="#第二种-设置远程库" class="header-anchor">#</a> 第二种，设置远程库</h2> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">git</span> init

<span class="token comment"># git add 文件名，例如</span>
<span class="token function">git</span> <span class="token function">add</span> SCY_BLOG
<span class="token comment"># 或者</span>
<span class="token function">git</span> <span class="token function">add</span> <span class="token parameter variable">-A</span>

<span class="token comment"># 添加远程库的方式, SCY_origin 远程仓库名</span>
<span class="token function">git</span> remote <span class="token function">add</span> SCY_origin git@github.com:xiaose-code/SCY_BLOG.git

<span class="token function">git</span> commit <span class="token parameter variable">-m</span> <span class="token string">'deploy'</span>

<span class="token function">git</span> branch <span class="token parameter variable">-M</span> main

<span class="token comment"># 最后就是 git push 的提交，因此设置了远程库，所以可以直接用下面这行命令</span>
<span class="token function">git</span> push <span class="token parameter variable">-u</span> SCY_origin main
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br></div></div><h2 id="后续更改继续提交的方式"><a href="#后续更改继续提交的方式" class="header-anchor">#</a> 后续更改继续提交的方式</h2> <p>如果在本地仓库中进行了更改，并希望将这些更改推送到远程仓库</p> <p>可以按照以下步骤操作：</p> <ol><li>首先，确保更改已经提交到本地仓库。如果没有提交，请使用以下命令提交更改：<div class="language- line-numbers-mode"><pre class="language-text"><code>git add .
git commit -m &quot;提交信息&quot;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div>请将 &quot;提交信息&quot; 替换为您想要使用的提交信息。</li> <li>推送更改到远程仓库：<div class="language- line-numbers-mode"><pre class="language-text"><code>git push
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div>这条命令会将本地的更改推送到与本地分支关联的远程仓库。如果已经设置了默认的远程仓库（在本例中是 <code>SCY_origin</code>），则只需要执行 <code>git push</code> 命令。如果您有多个远程仓库，需要指定远程仓库名称，如 <code>git push SCY_origin</code>。</li> <li>如果您想要推送指定分支的更改，可以执行以下命令：<div class="language- line-numbers-mode"><pre class="language-text"><code>git push &lt;远程仓库名称&gt; &lt;分支名称&gt;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div>例如，要将更改推送到 <code>SCY_origin</code> 远程仓库的 <code>main</code> 分支，可以使用以下命令：<div class="language- line-numbers-mode"><pre class="language-text"><code>git push SCY_origin main
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div>这样，您本地的更改就会被推送到远程仓库，其他人可以从中获取这些更改。</li></ol></div></div> <!----> <div class="page-edit"><!----> <!----> <!----></div> <div class="page-nav-wapper"><div class="page-nav-centre-wrap"><a href="/pages/ef40f0/" class="page-nav-centre page-nav-centre-prev"><div class="tooltip">KylinV10 安装 MySQL 教程（可防踩雷）</div></a> <!----></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/pages/ef40f0/" class="prev">KylinV10 安装 MySQL 教程（可防踩雷）</a></span> <!----></p></div></div></div> <!----></main></div> <div class="footer"><!----> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> 
    | Copyright © 2023-2023
    <span>霜晨月</span></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">
          跟随系统
        </li><li class="iconfont icon-rijianmoshi">
          浅色模式
        </li><li class="iconfont icon-yejianmoshi">
          深色模式
        </li><li class="iconfont icon-yuedu">
          阅读模式
        </li></ul></div></div> <!----> <!----> <!----></div><div class="global-ui"><canvas id="vuepress-canvas-cursor"></canvas></div></div>
    <script src="/assets/js/app.c23950b3.js" defer></script><script src="/assets/js/2.4615a819.js" defer></script><script src="/assets/js/88.e74f9927.js" defer></script>
  </body>
</html>
